#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int foot = 0;
    int inch = 0;
    int cm = 0;
    scanf("%d", &cm);
    foot = cm / 30.48;
    inch = 12 * (cm / 30.48 - foot);
    printf("%d %d", foot, inch);
    return 0;
}